package day08.synch02._04;

/**
 * <>
 * <详细描述>
 *
 * @Author WANG.SONG.
 * @Date 2019/3/5 0005 23:43
 * @see
 */
public class Biz {
    private String string=new String();
    public void a(){
        synchronized (string){
            System.out.println("a begin");
            try {
                Thread.sleep(3000);
                System.out.println("a end");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    synchronized public void b(){
        System.out.println("b begin");
        System.out.println("b end");
    }
}
